package com.woniuxy.cloud.carl.user.client;

import com.woniuxy.cloud.carl.user.client.param.AddUserCarParam;
import com.woniuxy.cloud.carl.user.client.result.UserCarDto;
import com.woniuxy.result.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

@FeignClient(contextId = "UserCarClient",name="user")
public interface UserCarClient {
@PostMapping("/addUserCar")
    public Result addUserCar(@RequestBody AddUserCarParam param);
@GetMapping("/findAllMyCar")
public   Result<List<UserCarDto>> findAllMyCar(@RequestParam("userId") Long userId);
@GetMapping("/defaultCar")
public Result defaultCar(@RequestParam("userCarId") Long userCarId);

    @GetMapping("/deleteCar")
    public Result deleteCar(@RequestParam("userCarId") Long userCarId);

    @GetMapping("/findDefaultCar")
    public Result<UserCarDto> findDefaultCar(@RequestParam("userId") Long userId);
}
